function checkFrm() {
    $("#submitBtn").html("正在提交...");
    $("#submitBtn").addClass("layui-btn-disabled");
}
var optionTmp = {
    type: "post",
    dataType: "json",
    beforeSubmit: checkFrm,
    url: doAddUrl,
    success: function (data) {
        dialog.alert(data.msg);
        if (data.flag) {
            //window.location.href = listUrl;
            setTimeout(function () {
                //window.parent.location.reload();
                window.parent.layui.table.reload('table-data');
                layui.data('checked', null);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            }, 500);

        } else {
            $("#submitBtn").html("确定提交");
            $("#submitBtn").removeClass("layui-btn-disabled");
        }
    },
    error: function () {
        dialog.alert("接口异常");
        $("#submitBtn").html("确定提交");
        $("#submitBtn").removeClass("layui-btn-disabled");
    }
};

$("#submitBtn").click(function () {
    $("#addFrm").ajaxSubmit(optionTmp);
});